/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'
import RangeLineView from '@/views/three/index.vue'
import { generateRangeRoutes } from '@/utils/study.js'

const CATE_VALUE_STRING = 'Three'
const CATE_VALUE_PREFIX = `${CATE_VALUE_STRING.toUpperCase()}_`

const rangeList = generateRangeRoutes(CATE_VALUE_PREFIX, CATE_VALUE_STRING, RangeLineView, true)

const chartsRouter = {
  path: '/three',
  component: Layout,
  redirect: 'noRedirect',
  name: 'Cate' + CATE_VALUE_STRING,
  meta: {
    title: '÷16 three',
    icon: 'line-chart'
  },
  children: [
    {
      path: 'ascending',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Ascending',
      meta: {
        title: 'ascending',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'ASCENDING_GROUPS'
      }
    },
    {
      path: 'odd-even',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'OddEven',
      meta: {
        title: 'odd even',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'ODD_EVEN_GROUPS'
      }
    },

    {
      path: 'modulo-three',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'ModuloThree',
      meta: {
        title: 'modulo three',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'MODULO_THREE_GROUPS'
      }
    },

    {
      path: 'prime',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Prime',
      meta: {
        title: 'prime',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'PRIME_NONPRIME_GROUPS'
      }
    },

    {
      path: 'mantissa',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Mantissa',
      meta: {
        title: 'mantissa',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'MANTISSA_GROUPS'
      }
    },

    {
      path: 'symmetric',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Symmetric',
      meta: {
        title: 'symmetric',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'SYMMETRIC_GROUPS'
      }
    },

    {
      path: 'skipped',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Skipped',
      meta: {
        title: 'skipped',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'SKIPPED_GROUPS'
      }
    },

    ...rangeList
  ]
}

export default chartsRouter
